package com.dahua.strategy.version1;

/**
 * @author sunhongguang
 * @create 2022-01-10-23:31
 */
public class CashRebate extends CashSuper {

    /**
     * 折扣率，初始折扣率为1，即原件
     */
    private double moneyRebate = 1.0;

    public CashRebate(double moneyRebate){
        this.moneyRebate = moneyRebate;
    }
    @Override
    public double acceptCash(double money) {
        return money * moneyRebate;
    }
}
